<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title>热搜关键词-[[${T(com.b2c.erp.DataConfigObject).getInstance().getSysName()}]]</title>

</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">
<div class="layui-body" style="padding:15px;">
    <div class="layui-tab layui-tab-brief" lay-filter="demo">
        <ul class="layui-tab-title">
            <li class="layui-this">热搜关键词</li>
            <li ><a href="javascript:;">商品热销榜</a></li>
            <li ><a href="javascript:;">商品飙升榜</a></li>
        </ul>
    </div>
    <style>
        .hideAddress{
            width: 300px;
            display: inline-block;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    </style>
    <style>
        .sp-tree {
            display: none;
            position: absolute;
            z-index: 199999999;
            width: 300px;
            /*height: 100px;*/
            padding: 10px;
            overflow-y: auto;
            background: #fff;
            border: 1px solid #d3d3d3;
        }

        .sp-tree li {
            position: relative;
            font-size: 12px;
            line-height: 20px;
            padding-left: 20px
        }

        .sp-tree li li {
            border-left: 1px solid #ccc;
        }

        .sp-tree li h3 {
            font-weight: normal;
            cursor: pointer;
        }

        .sp-tree li h3 b {
        }

        .sp-tree li h3 b:hover {
            text-decoration: underline;
        }

        .sp-tree li i {
            position: absolute;
            left: 0;
            top: 0;
            font-size: 16px;
            font-weight: bold;
            width: 20px;
            height: 20px;
            line-height: 20px;
            text-align: center;
        }

        .sp-tree li ul {
            display: none;
        }
    </style>
    <!-- content starts -->
    <!--    <blockquote class="layui-elem-quote">订单总览</blockquote>-->

    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane1" method="get" th:action="@{/big_data/keyword_hot_list}">

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <input type="text" name="keyword" th:value="${keyword}" placeholder="关键词" class="layui-input" autocomplete="off" style="width: 200px">
                    </div>
                    <div class="layui-inline" id="categoryDIV">
                        <input type="text" name="category" id="sp-sort" th:value="${category}" placeholder="类目" class="layui-input" autocomplete="off" style="width: 200px">
                        <input type="hidden" name="categoryId" id="categoryId" th:value="${categoryId}"/>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="source" id="source">
                                <option value="">平台</option>
                                <option value="淘宝">淘宝</option>
                                <option value="拼多多">拼多多</option>
                                <option value="抖音">抖音</option>
                            </select>
                        </div>
                    </div>


                    <div class="layui-inline">
                        <button type="submit" class="layui-btn">搜索</button>
                        <i>总共：<span style="color: red" th:text="${totalSize}"></span>条记录</i>
                    </div>
                    <div class="layui-inline">
                        <a href="javascript:;" id="add_keyword" class="layui-btn layui-btn-normal">添加新关键词</a>
                    </div>
                   
                </div>

            </form>
        </div>
    </fieldset>

    <!-- start dd-wrapper -->
    <link rel="stylesheet" href="/goods/order.css"/>
    <div class="dd-wrapper">
        <table class="dd-table">
            <tr>
               <th>排名</th>

                <th>关键词</th>
                <th>类目</th>
                <th>平台</th>
                <th>搜索人气</th>
                <th>搜索热度</th>
                <th >点击人气</th>
                <th >点击热度</th>
                <th >点击率</th>
                <th>支付转化率</th>
                <th>在线商品数</th>
                <th>成交指数</th>
                <th>竞争指数</th>
                <th>收录日期</th>
                <th>创建时间</th>
          
            </tr>
            <tr th:each="item:${lists}">
               <td th:text="${item.ranking}"></td>

                <td>
                    <p th:text="${item.keyword}"></p>
                </td>
                <td><p th:text="${item.category}"></p></td>
                <td><p th:text="${item.platform}"></p></td>
                <td >
                    <p th:text="${item.sousuorenqi}"></p>
                </td>
                <td >
                    <p th:if="${item.sousuoredu > 0}" th:text="${item.sousuoredu}"></p>
                    <p th:if="${item.sousuoredu == 0}" >-</p>
                </td>
                <td>
                    <p th:if="${item.dianjirenqi > 0}" th:text="${item.sousuoredu}"></p>
                    <p th:if="${item.dianjirenqi == 0}" >-</p>
                </td>
                <td th:text="${item.dianjiredu}"></td>
                <td >
                    <span th:text="${item.dianjilv}"></span>%
                </td>
                <td >
                    <span th:text="${item.zhifulv}"></span>%
                </td>
                <td >
                    <span th:text="${item.goodsCount}"></span>
                </td>
                <td >
                    <span th:text="${item.chengjiaozhishu}"></span>
                </td>
                <td >
                    <span th:text="${item.jingzhengzhishu}"></span>
                </td>
                
                <td th:text="${item.includeDate}"></td>
                <td th:text="${item.createTime}"></td>
       
            </tr>
        </table>
    </div>
    <!-- end dd-wrapper -->
    <div class="layui-box layui-laypage layui-laypage-default pageBox">
        <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
    </div>


    <script type="text/javascript">
        var layer;
        var $;
        var windowOpen;


        layui.use(['laydate', 'jquery', 'form', 'layer'], function () {
            var laydate = layui.laydate;
            $ = layui.jquery;
            var form = layui.form;
            layer = layui.layer;
            laydate.render({
                elem: '#startTime'
                ,type:'year'
            });

            $("#source").val('[[${source}]]');
            form.render();
            var category = '[[${category}]]';
            var categoryId = '[[${categoryId}]]';
            $("#sp-sort").val(category);
            $("#categoryId").val(categoryId);

            $(function () {
                $("#add_keyword").click(function(){
                    $.ajax({
                    type:"POST",
                    url:"/selenium/pdd_cj",
                    processData: false, //表明不要对数据进行处理
      
                    contentType: 'application/json',
                    success:function (res) {
                        if(res.code == 0){
                            parent.layer.msg(res.msg)
                        }else {
                            layer.msg(res.msg)
                        }
                        return false;
                    }
                });
                })
            })
        });

    </script>


</div>
</body>
</html>
